<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->params['static'].'assets/js/bootbox.min.js',2); ?>
<div class="page-header">
							<h1>
							 <?php echo $ac->name ;?> 活动报表(已通过审核)
							</h1>
</div>

<div class="row">
	<div class="col-xs-12">
		  <div class="row">
			   <div class=" col-xs-12">
													<div class="widget-box">
														<div class="widget-header widget-header-small">
															<h5 class="lighter">查询</h5>
														</div>

														<div class="widget-body">
															<div class="widget-main">
																<?php $this->renderPartial("_searchform",array('classRooms'=>$classRooms,'major'=>$major)); ?>
															</div>
														</div>
													</div>
													
			</div>
			</div>	
				<div class="row">
				   <div class=" col-xs-12">
				  <div class="widget-box">
														<div class="widget-header widget-header-small">
															<h5 class="lighter">共检索出 <?php echo $total; ?>条结果 </h5>
														</div>

														<div class="widget-body">
															<div class="widget-main">
						<div class="table-responsive">
									
											<table id="sample-table-1" class="table table-striped table-bordered table-hover">
												<thead>
													<tr>
														
														<th>学生姓名</th>
														
														<th  >班级</th>
														
														<th  >年级</th>
														<th  >专业</th>
														<th  >添加内容</th>
													    <th>
															<i class="icon-time bigger-110  "></i>
															添加时间
														</th>
														
														
													</tr>
												</thead>

												<tbody>
												<?php
												  foreach($stuAcs as $s){
													  $realName = $s->stuinfo?$s->stuinfo->realName:'未添加';
													  $class = $s->stuinfo?$s->stuinfo->classRoom:'未添加';
													  $grade = $s->stuinfo?$s->stuinfo->grade:'未添加';
													  $major = $s->stuinfo?$s->stuinfo->major:'未添加';
													 echo '
													<tr stu-activity-id = "'.$s->stuActivityId.'">
													  
														<td>
															<a href="#">'.$realName.'</a>
														</td>
														
														<td  >'.$class.'</td>
														
														<td>'.$grade.'</td>
														<td>'.$major.'</td>
														
														
														<td  >
														<span display-detail-id="'.$s->stuActivityId.'" style="display:none;">'.$s->detail.'</span>
															<button class="btn btn-sm btn-info" detail-id="'.$s->stuActivityId.'">
																详情
															</button>
														</td>
														<td>'.$s->addtime.'</td>
													
													</tr>';
												  }
                                                   ?>
												</tbody>
											</table>
											<form target="_blank" method="get"  action="<?php echo Yii::app()->createUrl('activity/exportexcel'); ?>">
												<?php
													$request = Yii::app()->request;
													echo '<input type="hidden" value="'.$request->getParam('id').'" name="activityId">';
													echo '<input type="hidden" value="'.$request->getParam('grade').'" name="grade">';
													echo '<input type="hidden" value="'.$request->getParam('major').'" name="major">';
													echo '<input type="hidden" value="'.$request->getParam('classRoom').'" name="classRoom">';
													echo '<input type="hidden" value="'.$request->getParam('stuNum').'" name="stuNum">';
													
												?>
											  <button type="submit" class="btn btn-info" >
												<i class="icon-share"></i>
													导出为 EXCEL								
											  </button>
									       </form>
										</div><!-- /.table-responsive -->
								<div class="col-xs-12" style="text-align:center">
										     <?php 
											 $this->widget('CLinkPager',array( 
													'htmlOptions'=>array('class'=>'pagination'),
													'cssFile'=>false,
													'header'=>'',    
													'firstPageLabel' => '首页',    
													'lastPageLabel' => '末页',    
													'prevPageLabel' => '上一页',    
													'nextPageLabel' => '下一页',    
													'pages' => $pages,    
													'maxButtonCount'=>13    
												)    
											);    
												
										?>
							       </div>
							
										</div>
									</div>
								</div>	
							</div>			
							</div>
						</div>
					</div>			


<script type="text/javascript">

			jQuery(function($) {
			
				$('[detail-id]').on("click",function(){
					var id = $(this).attr('detail-id');
					bootbox.alert($("[display-detail-id = "+id+"]").html(),function(){
						
						
					});

				  return false;
				   
				});
				
				
			})
		
</script>